import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:winkai/utils/image_utils.dart';
import 'package:winkai/widget/custom_style_bg.dart';

class SettingVipInfoWidget extends StatelessWidget {
  const SettingVipInfoWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        CustomStyleBg(
          width: 345.w,
          height: 200.w,
          borderRadius: 32,
          borderWidthRate: 2.8,
          color: const Color(0xffF8FFD9),
          margin: EdgeInsets.only(top: 23.w),
          padding: EdgeInsets.only(left: 145.w, right: 24.w),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              SizedBox(
                width: double.infinity,
                child: Text(
                  'vip_upgrade'.tr,
                  style: TextStyle(
                    fontSize: 20.sp,
                    fontWeight: FontWeight.w800,
                    fontFamily: 'LexendDeca-Black',
                    color: Colors.black,
                  ),
                ),
              ),
              SizedBox(height: 8.w),
              item('vip_intro1'.tr),
              SizedBox(height: 2.w),
              item('vip_intro2'.tr),
              SizedBox(height: 2.w),
              item('vip_intro3'.tr),
              SizedBox(height: 2.w),
              item('vip_intro4'.tr),
              SizedBox(height: 12.w),
              exploreWidget(),
            ],
          ),
        ),
        Padding(
          padding: EdgeInsets.only(left: 1.w),
          child: ImageUtils.getImage('ic_ai_setting_image', 159.w, 220.w),
        ),
      ],
    );
  }

  Widget item(String name) {
    return SizedBox(
      width: double.infinity,
      child: Text(
        name,
        style: TextStyle(
          fontSize: 10.sp,
          fontWeight: FontWeight.w500,
          color: Colors.black,
        ),
      ),
    );
  }

  Widget exploreWidget() {
    return CustomStyleBg(
      width: double.infinity,
      height: 43.w,
      borderRadius: 24.w,
      color: const Color(0xffDFFF32),
      borderWidthRate: 2.5,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          ImageUtils.getImage('ic_ai_setting_vip', 24.w, 24.w),
          SizedBox(width: 5.w),
          Text(
            'setting_explore'.tr,
            style: TextStyle(
              fontSize: 14.sp,
              fontWeight: FontWeight.w500,
              color: Colors.black,
            ),
          )
        ],
      ),
    );
  }
}
